package com.dmzc.stage1.chapter2;

public class ThreadConstruction {
    public static void main(String[] args) {
        Thread t1=new Thread("t1");
        ThreadGroup group=new ThreadGroup("TestGroup");
        Thread t2=new Thread(group,"t2");
        ThreadGroup mainThreadGroup=Thread.currentThread().getThreadGroup();
        System.out.println("t1's ThreadGroup equals mainThreadGroup:"+(t1.getThreadGroup()==mainThreadGroup));
        System.out.println("t2's ThreadGroup equals mainThreadGroup:"+(t2.getThreadGroup()==mainThreadGroup));
    }
}
